<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="lib/vue.global.js"></script>
</head>
<body>
    <div id="root">
        {{ count }}
        <div>
          <!-- <button @click="count+=1">add</button> -->
          <button @click="handlerClick">add</button>
        </div>
      </div>
</body>
<script type="module">
    const { createApp, ref, watchEffect, onMounted } = window.Vue

    import useCount from './05useCount.js'
    import useTitle from './05useTitle.js'

    const app = createApp({
        setup () {
            const { count, handlerClick } = useCount()

            useTitle(count)

            return {
                count,
                handlerClick
            }
        }
    })
    app.mount('#root')
</script>
</html>